package com.yonyou.cyxdms.sysAuth.service.dto.dealer;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 
 * </p>
 *
 * @author adu
 * @since 2019-09-12
 */
@TableName("tm_msg_record_manage")
public class MsgRecordManagePO extends DMSBasePO<MsgRecordManagePO> {

    private static final long serialVersionUID = 1L;

    /**
     * 公告ID
     */
        @TableId(value = "MSG_ID", type = IdType.AUTO)
        private Integer msgId;
    /**
     * 员工id
     */
    @TableField("USER_ID")
    private Integer userId;
    /**
     * 公告阅读状态
     */
    @TableField("NOTICE_READ")
    private Integer noticeRead;
    /**
     * 公告确认状态
     */
    @TableField("NOTICE_CONFIRM")
    private Integer noticeConfirm;
    /**
     * 是否删除
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Integer isDeleted;

    public MsgRecordManagePO() {
        super();
    }


    public Integer getMsgId() {
        return msgId;
    }

    public void setMsgId(Integer msgId) {
        this.msgId = msgId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getNoticeRead() {
        return noticeRead;
    }

    public void setNoticeRead(Integer noticeRead) {
        this.noticeRead = noticeRead;
    }

    public Integer getNoticeConfirm() {
        return noticeConfirm;
    }

    public void setNoticeConfirm(Integer noticeConfirm) {
        this.noticeConfirm = noticeConfirm;
    }

    @Override
    public Integer getIsDeleted() {
        return isDeleted;
    }

    @Override
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.msgId;
    }

    @Override
    public String toString() {
        return "MsgRecordManagePO{" +
        "msgId=" + msgId +
        ", userId=" + userId +
        ", noticeRead=" + noticeRead +
        ", noticeConfirm=" + noticeConfirm +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author adu
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "msgId");
    }


}
